<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MotaSiteStandard.Master"
    Inherits="System.Web.Mvc.ViewPage<MotaWeb.Models.Interfaces.ISiteUser>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    MoTA Admin - Edit User
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Edit User Details</h2>
    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
    <% using (Html.BeginForm())
       {%>
    <fieldset>
        <legend>User Details</legend>
        <p>
            <label for="UserName">
                User name:</label>
            <%= Html.TextBox("UserName", Model.UserName) %>
            <%= Html.ValidationMessage("UserName", "*") %>
        </p>
        <p>
            <label for="FirstName">
                First name:</label>
            <%= Html.TextBox("FirstName", Model.FirstName) %>
            <%= Html.ValidationMessage("FirstName", "*") %>
        </p>
        <p>
            <label for="LastName">
                Last name:</label>
            <%= Html.TextBox("LastName", Model.LastName) %>
            <%= Html.ValidationMessage("LastName", "*")%>
        </p>
        <p>
            <label for="Email">
                Email:</label>
            <%= Html.TextBox("Email", Model.Email) %>
            <%= Html.ValidationMessage("Email", "*")%>
        </p>
        <p>
            <label for="AssignedRoles">
                Assigned Roles:</label>
            <%= Html.ListBox("Roles", ViewData["SelectedRoles"] as MultiSelectList) %>
            <%= Html.ValidationMessage("SelectedRoles", "*")%>
        </p>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
